
 class Petshop {
	private Pet[] pets;
	private int foot;
	
	public Pet[] getPets() {
		return pets;
	}
	public void setPets(Pet[] pets) {
		this.pets = pets;
	}
	public Petshop(int len){
		if(len>0){
			this.pets=new Pet[len];
		}
		else
			this.pets=new Pet[1];
	}
	public boolean add(Pet pet){
		if(this.foot<this.pets.length){
			this.pets[this.foot]=pet;
			this.foot++;
			return true;
		}
		else 
			return false;
	}
	public Pet search(String keyword){
		Pet p=null;
		for(int i=0;i<this.pets.length;i++){
			if(this.pets[i] !=null){
				if(this.pets[i].getCno().indexOf(keyword)!=-1){
					p=this.pets[i];
				}
			}
		}
		return p;
	}
}
